﻿#ifndef STU_INFOR_MANAGE_H
#define STU_INFOR_MANAGE_H

#include <QWidget>
#include"face.hpp"
#include <opencv2/opencv.hpp>
#include"trainthread.h"
#include<QTimer>
using namespace std;
using namespace cv;
namespace Ui {
class stu_infor_Manage;
}

class stu_infor_Manage : public QWidget
{
    Q_OBJECT

public:
    explicit stu_infor_Manage(QWidget *parent = nullptr);
    ~stu_infor_Manage();

private slots:
    void readframe();
    void on_OpenCam_pressed();

    void on_pBcollect_clicked();


    void on_CloseCam_clicked();

    void on_pBtrain_clicked();

    void on_pBselectFile_clicked();
    void train_over();

    void on_pBstartrain_clicked();



    void on_pB_AddStu_clicked();

private:
    Ui::stu_infor_Manage *ui;
    CascadeClassifier  cascade_1;
    TrainThread *train;
    QTimer timer_2;
    VideoCapture capture;
    Mat frame,gray, frameRGB;;
    vector<Rect>faces;
    string Face_save;
    QString dir_str;
    Mat myface;
    int pic_num=1;





};

#endif // STU_INFOR_MANAGE_H
